<template>
  <div>
    <h1>展示分类</h1>
    <table border="1" cellspacing="0">
      <tr>
        <td>名称</td>
        <td>操作</td>
      </tr>
      <tr v-for="i in cate">
        <td>{{ i.name }}</td>
        <td>
          <router-link :to="{name:'get_cate1',query:{'id':i.id}}">查看</router-link>
        </td>
      </tr>
    </table>


  </div>
</template>

<script>
export default {
  name: "get_cate",
  data() {
    return {
      cate: []
    }
  },
  methods: {
    get_cate() {
      this.$axios.get('cate/')
        .then(res => {
          this.cate = res.data.list
        })
    }
  },
  mounted() {
    this.get_cate()
  }
}
</script>

<style scoped>

</style>
